const express = require('express')
const path = require('path')

const app = express()

app.set('view engine', 'ejs')

app.set('views', path.resolve(__dirname, './views'))

app.get('/home', (req, res) => {
  let title = '尚硅谷'
  res.render('home', { title })
})

app.listen(3000, () => {
  console.log('服务已经启动，端口3000 正在监听中...')
})
